home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / term-2.3.5 / README < prev    next >
Encoding:
Text File  |  1995-07-14  |  14.8 KB  |  368 lines

  1. PLEASE READ THE FILE "README.security" for important information!
  2.  
  3. ------------------------------------------------------------------------
  4.                Term. version 1.11
  5.  
  6.           Copyright (c) 1992,1993,1994 Michael O'Reilly
  7.           All Rights Reserved
  8.  
  9.     This program is free software; you can redistribute it and/or modify
  10.     it under the terms of the GNU General Public License as published by
  11.     the Free Software Foundation; either version 1, or (at your option)
  12.     any later version.
  13.  
  14.     This program is distributed in the hope that it will be useful,
  15.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.     GNU General Public License for more details.
  18.  
  19.     You should have received a copy of the GNU General Public License
  20.     along with this program; if not, write to the Free Software
  21.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22.  
  23. -------------------------------------------------------------------------------
  24.  
  25. --> Read the 'CHANGES' file as this will be more up to date than this
  26. readme.
  27.  
  28. --> Please read this entire file if you have any problems.
  29.  
  30. *********************************************************************
  31. --> Please don't send me e-mail telling me you liked it! My mailbox
  32. overfloweth! Postcards on the other hand are most welcome. 
  33.  
  34.     Michael O'Reilly
  35.     192 Nicholson Rd
  36.     Subiaco 6008
  37.     Perth, Western Australia
  38.     Australia
  39.     
  40. I guess this makes this postcardware.....
  41. *********************************************************************
  42.  
  43. ---> For a sample ~/.term/termrc file see TERMRC
  44.  
  45. Term is a program to implement a slip-like connection between 2 *NIX
  46. machines. It isn't sl/ip. It runs entirely in user mode. It requires no
  47. kernel support on either end, and no root access on either end. It is
  48. built to run over a modem to connect a non-internet machine with an
  49. internet machine. If this is your situation, and you don't have
  50. slip/ppp then term is for you.  If you do have slip/ppp, then you
  51. should probably use it instead.
  52.  
  53. Term is run at both ends, and does multiplexing, error correction, and
  54. compression across the serial link between them. Designed to be as
  55. efficient as possible, and have good response time, even over slow
  56. modems. (I run it over a 2400 baud modem). [ Well, I used to. Roll on
  57. 14.4! M - 7/1/94]
  58.  
  59. Note that it behaves the same from both ends. A user on either machine
  60. can connect to the other.
  61.  
  62. The term program runs as a server. A UNIX-domain socket is opened and
  63. bound to support communication between client processes and the
  64. server.
  65.  
  66. See 'old/PROTOCOL.unix' for the protocol used by clients.  
  67. See 'old/PROTOCOL.serial' for the protocol used across the serial link.  ( Be
  68. warned that they are out of date. If in doubt, read the source :)
  69.  
  70. These six clients are the most useful:
  71.  
  72.     trsh
  73.     Runs a shell on the remote end. Like a normal login.  (Similar
  74.         to "rsh" without the need to specify a hostname.)
  75.     tupload <local file> -as <remote file>
  76.     Uploads a file. takes the name of the local file and the optional
  77.     arg is the name of the remote file.  This is a bit more robust than
  78.         "rcp", but at the price of not allowing you to specify a different
  79.         host or username.
  80.     txconn
  81.     Hangs around in the background waiting for X connections. re-directs
  82.     them to the local X server. Intended to be run on the remote machine.
  83.     tredir
  84.     Lets you alias a port on one system to another. I.e. 'tredir 4000 23'
  85.     run on host 'a' means that anyone telneting to port 4000 on 'a',
  86.     will get a login prompt of machine 'b'.
  87.     tshutdown
  88.     Terminates term.
  89.  
  90.  
  91. [More up to date information is available in HOWTO.term]
  92.  
  93. By default the program assumes that your modem can transmit data at the
  94. same speed as your computer's serial port connection to the modem.  To
  95. set the proper rate run term as:
  96.     'term -s9600'
  97. for a 9600 baud modem.  Alternatively try :
  98.     'setenv BAUDRATE 9600'
  99. or specifying:
  100.     baudrate 9600
  101. in your termrc. The baudrate determines how fast term will try
  102. to send data to the modem. I.e. if BAUDRATE is 9600, it will only
  103. attempt to send 9600 bits per second to the modem.  However, the best
  104. way to specify transmission rates is to write a termrc file.
  105.  
  106. Term reads the ~/.term/termrc file if it exists, so you can
  107. permanently set this stuff.  A system default termrc file may be
  108. named /etc/termrc.
  109.  
  110. Look in the file TERMRC.
  111.  
  112. To terminate a term session use the command "tshutdown".  If that
  113. doesn't work, either end will exit if it gets five zeros.  (i.e.
  114. "00000")  This means that if "tshutdown" fails you can kill the
  115. local end, and then type '000000' into your comm program or
  116. 'echo 0000000 > /dev/modem'.
  117.     
  118. ----------------------------------------------------------
  119. How to use txconn: (and term for that matter)
  120.  
  121. Login to your remote machine.
  122. run
  123.     "term -r"
  124.  
  125. Break back to your Linux prompt. I.e if you are running xcomm or
  126. something similar then type control-A, x (to break back to xcomm
  127. prompt). Then run term with stdin/stdout connected to the modem. 
  128.  
  129. In xcomm I type
  130.     "$ term"
  131. Alternatively you could exit your comms program altogether and run
  132.     "term < /dev/ttys1 > /dev/ttys1" from the shell prompt.
  133.         (assuming that /dev/ttys1 is your modem port).
  134.         Makes certain your comms program ISN'T running if you
  135.         try the above, as it will fight with term if it is.
  136.         
  137. Then run 'trsh' from a shell prompt. (I generally run xcomm and term
  138. on tty8, and then switch to tty7 to run trsh. You may find it handy to
  139. have a entry in /etc/passwd looking like...
  140.     remote::0:0::/root:/usr/local/bin/trsh 
  141. as this then enables you to login to your remote machine by logging in
  142. as 'remote').
  143.  
  144. This should give you (in about 2 seconds) a shell on your remote
  145. machine. At this point the error correction/compression is on. You can
  146. go to another tty to run another trsh giving you multiple shells etc.
  147.  
  148.  
  149. None of the above needs X-windows to run.
  150. ------------------------------------------ 
  151.  
  152. To run txconn:
  153.   Make sure you are running X-windows. txconn will
  154. assume you have x-windows running.
  155.  
  156. After running 'trsh', type
  157. if you are running tcsh, or csh:
  158.     "setenv DISPLAY `hostname`:0 ; setenv DISPLAY `txconn`" for csh/tcsh 
  159. otherwise, if you are running 'sh' , or 'ksh':
  160.     "export DISPLAY=`hostname`:0 ; export DISPLAY=`txconn`"
  161. on the trsh. (i.e. run txconn on your remote machine).
  162. It should exit immediately. (This is because it starts a process in the 
  163. background).
  164.  
  165. Here, `hostname` returns the hostname of your REMOTE machine. (i.e. the
  166. machine you ran txconn on. To make that very clear. The local machine
  167. is the machine you are typing on, the remote is the one at the other
  168. end of the modem link. Run txconn on the remote machine. hostname is
  169. set to be the name of your remote machine. DON'T use the hostname of
  170. your local machine).
  171.  
  172. Then you can run any x-windows program on your remote machine, and it
  173. should appear on your screen.
  174.  
  175.  
  176. Things that can go wrong compiling..
  177. [See INSTALL for more up to date information.]
  178.  
  179. 1) configure complains about your OS not being define.  You'll have
  180.    to either edit the configure script, or find an OS that is "close
  181.    enough".
  182.  
  183. 2) config.h gives a message about the OS being undefined. 
  184.     config.h sets up a list of #define's based on what OS you are
  185.     compiling on. Please (if you can) write support for your OS, and
  186.     mail me the patches so I can support it. If you can't mail me
  187.     with details of you machine, and I will see what I can do.
  188.  
  189. If things go wrong, make sure you run the local end with the '-n on' flag.
  190. This won't help, but it can give you some clues as to what's going
  191. wrong. 
  192.  
  193. Things that can go wrong:
  194. 1) term giving message like
  195.     ": timed out at 60 trans 4"
  196.     This should be read as "A packet got no acknowledgment even though it
  197.     has been waiting for 60/20th's of a second, so it is being 
  198.     re-transmitted for the 4th time."
  199.  
  200.      These errors are normal. Line noise etc will cause packets to be
  201.     lost and retransmitting is the way they are recovered.
  202.  
  203.      Times when it isn't normal:
  204.     a) Constantly re-transmitting i.e the last number just keeps
  205.     going up. This indicated one of 
  206.         i) The remote term has died. Shouldn't happen.
  207.        ii) The line is not an 8 bit line.
  208.         You can check this by running the linecheck program.
  209.     
  210.         Look up 'sevenbit' in TERMRC or term(1) if you have a
  211.         sevenbit line. 
  212.       iii) Line noise has sent a XOFF character and your terminal
  213.         server has treated it is a quench signal. You
  214.         shouldn't be using software flow control with term.
  215.         turn if off if you can. Look up the -f option in OPTIONS
  216.         or 'flowcontrol' in TERMRC or term(1).
  217.     b) Any retransmissions on an error correcting modem.
  218.         Any of the above, and
  219.        iv) The BAUDRATE is set too high. Too much data is being
  220.         buffered by the operating system.
  221.         c) Term tells you to an old packet has been received and to raise
  222.            your timeout.
  223.             v) If this happens rarely, just ignore it.  If it happens a lot,
  224.                then you should follow this advice and raise your timeout to
  225.                a higher #.  
  226.         d) Lots of errors when you run multiple tasks at once.
  227.        vi) Try "collisions on" in your termrc files, to tell term to lower
  228.                its transmission rate when receiving data.
  229.         
  230. 2) Term not doing anything. Everything hangs.
  231.     i) The clients can't talk to the term socket.  Look at client.c.
  232.     ii) I have stuffed up and left a bug in a released version.
  233.     iii) The line is really dirty and it is eating one of the characters
  234.     term is using. See linecheck below.
  235.     iv) Mail me with LOTS of details.
  236. 3) Term constantly giving you the prompt from your remote machine.
  237.     You have run the remote term in the background. Don't do this.
  238. 4) Trsh hangs after you have typed a few keystrokes.
  239.     You have a dirty line. A terminal server or something like
  240.     that is eating some characters. Run linecheck. See
  241.     term_setup.1 for more information. See TERMRC for more information. See
  242.     below for more information.
  243. 5) Term works fine, but if you have tredir's running, and you
  244.     login from the other end, all the tredirs exit.
  245.  
  246.     This is because you are missing the 'remote' keyword. You need
  247.     "remote" on ONE end only. This keyword should go in your
  248.     ~/.term/termrc file. Alternatively run ONE term with the '-r' flag,
  249.     as was shown in the example above.
  250.  
  251. ------------
  252. USAGE OF linecheck.c
  253.  
  254. [ this is probably out of date. Check the start of the linecheck.c
  255. file. M - 7/1/94]
  256.  
  257.  initially written by Michael O'Reilly
  258.  *seriously* bashed about by by quarters
  259.  hell, I wonder if diff would find more than 5 matching lines anymore...
  260.  jefftep@cs.utexas.edu
  261.  jeff grills
  262.  
  263.  
  264. Without term running do the following. (i.e. on a bare serial line.
  265. Nothing but your comms program is running.)
  266. if you use a csh type shell (csh, or tcsh), then run /bin/sh before
  267. you do the following
  268.  run remotely like:      linecheck 2> remote.output
  269.              locally:    linecheck < /dev/modem > /dev/modem 2> local.output 
  270.     
  271.  
  272.  if it says something needs escaped, that means it didn't get through okay
  273.  this time. if you get an invalid packet printed, it means the packet wasn't
  274.  sent by the linecheck on the other side, and may either be line static,
  275.  or some very braindead terminal response to a (possibly series) of characters
  276.  to what was printed over the line.  in this case, it's your responsibility
  277.  to determine which, and escape the previously sent char if needed.  There is
  278.  no way this program can identity a braindead terminal server from line static,
  279.  so this is the way it has to be.
  280.  
  281.  if, for some reason, you get stuck out in lala land, and can't kill
  282.  the program, try typing "^jexit^j".  That should kill it, and restore
  283.  your terminal.   
  284.  
  285.  It'll print "### sending char" and "### received valid".  Don't worry if these
  286.  two number are out of sync.  That's fine.  Just worry, on either side, if you
  287.  get some "Invalid packet: " lines.  Look at them closely, and see if it's line
  288.  static, or a real problem.
  289.  
  290.  At the end, it'll print out a summary of what it thinks you should escape.
  291.  This just means these chars didn't get received correctly this time.  Again,
  292.  if line static munched something, some of these may be valid. 
  293.  
  294.  To actually escape them, you have to put them into your termrc file.
  295.  So if it said to escape 0-31, then on the OTHER end from the one that
  296.  printed it, you add the line 'escape 0-31' to your ~/.term/termrc file.
  297.  Please note that the local.output file contains the characters that
  298.  should be escaped on the REMOTE end, and vice versa. See TERMRC and
  299.  term(1) for more on escaping characters.
  300.  
  301.  *** IF *** your terminal server generates extra responses for odd chars,
  302.  then you may not be told to escape something, but need to anyway.  This will
  303.  be evident from a "Invalid packet: " on the local side, after attempting to
  304.  send a character.  Again, it may be line static. You have to make the call.
  305.  
  306.  if you're running it locally in a xterm, I suggest you turn on logging.
  307.  
  308.  if you have problems with this program, and want me to look at it, mail me
  309.  *both* the local and remote output, and label them appropriately.
  310.  
  311. programmers notes:
  312.  
  313.  hopefully, soon, I'll add the ability to skip chars to this program,
  314.  so you can test out the escapes you want.
  315.  
  316.  maybe do a fork() and process the two sides independently, so it never hangs.
  317.  would cause minor quitting problems, but may be worth it.
  318.  
  319. Any problems, feel free to mail me. Any patches, bug fixes, etc are
  320. VERY welcome.
  321.  
  322. Michael (oreillym@tartarus.uwa.edu.au);
  323.  
  324. P.S.
  325. Bill Riemers (bcr@physics.purdue.edu) is temporarily maintaining this code,
  326. originally written by Michael O'Reilly (oreillym@tartarus.uwa.edu.au).
  327.  
  328. ----------
  329.  
  330. From michael@iinet.com.au  Tue Jul 19 22:33:54 1994
  331. From: michael@iinet.com.au (Michael O'Reilly)
  332. Subject: I saw...
  333.  
  334. term 202 go past today. Looks just beautiful. :)
  335.  
  336. Given the awesome mods you've made, it's probably a good idea to
  337. change the docs to mention, term, original written by me, now
  338. fixed, beautified, made useful, and supported by you.
  339.  
  340. Michael
  341.  
  342. -----------
  343.  
  344. Hmm, really most of the credit should go to the people listed in CREDITS.
  345. Some of these people have probably done a lot more with term development
  346. than I have.  :-)
  347.  
  348. Originally I started using term because it was the only option for multi-
  349. tasking over a modem without remote root support.  At this point I think
  350. it is quite competitive with SLIP and PPP. 
  351.  
  352. Pro's:
  353.         - Often times term is faster.
  354.         - Term gives you true firewall security.  Users can only access 
  355.           network commands you explicitly allow with a SUID or SGID command.
  356.           And you will never be sprayed, or have to worry about network
  357.           users ports you have redirected!
  358.         - No root support required.
  359.  
  360. Con's:  
  361.         - Programs have to be compiled with term support to work.
  362.     - Not everything works.  Programs like "ping" which normally
  363.           must be SUID root never will work.  Although "rsh" type commands
  364.       are already an exception to this rule.
  365.         - "fet" term's equivalent of "dip" isn't nearly as smart as "dip".
  366.         - It is doubtful NFS mounts over term will ever be supported.
  367.  
  368.